#define _CRT_SECURE_NO_WARNINGS 1

#include <iostream>

using namespace std;

#include "list.h"


void test01()
{
	dr::list<int> lt;
	lt.push_back(1);
	lt.push_back(2);
	lt.push_back(3);
	lt.push_back(4);

	//for (int& e : lt)
	//{
	//	cout << e << " ";

	//}
	//cout << endl;

	dr::list<int>::iterator it = lt.begin();
	while (it != lt.end())
	{
		cout << *it << " ";
		++it;
	}
	cout << endl;


	//for (int& e : lt)
	//{
	//	cout << e << " ";
	//}
	//cout << endl;
}

void test02()
{
	dr::list<int> lt1;
	lt1.push_back(1);
	lt1.push_back(2);
	lt1.push_back(3);
	lt1.push_back(4);

	//for (int& e : lt1)
	//{
	//	cout << e << " ";
	//}
	//cout << endl;

	dr::list<int> lt2 = {5,6,7,8};
	lt2.push_back(7);
	lt2.push_back(8);
	lt2.push_back(9);

	lt1 = lt2;

	for (int& e : lt1)
	{
		cout << e << " ";
	}
	cout << endl;

	for (int& e : lt2)
	{
		cout << e << " ";
	}
	cout << endl;

}

int main()
{
	test02();
	return 0;
}